package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by DK on 16/10/25.
 * 产品统计表
 */
@Entity
@Table(name = "product_statistics")
@DynamicInsert
@DynamicUpdate
public class ProductStatistics extends IDEntityMall {

    @Column(columnDefinition = "bigint comment'平台ID'")
    private Long mallId;

    @Column(columnDefinition = "bigint comment'商家ID'")
    private Long merchantId;

    @Column(columnDefinition = "bigint comment'产品ID'")
    private Long productId;

    @Column(columnDefinition = "bigint comment'分销产品id'")
    private Long marketProductId;

    @Column(columnDefinition = "bigint comment'销售数'")
    private Long saleCount = 0L;

    @Column(columnDefinition = "bigint comment'分享数'")
    private Long shareCount = 0L;

    @Column(columnDefinition = "bigint comment'核销数'")
    private Long verifyCount = 0L;

    @Column(columnDefinition = "bigint comment'浏览数'")
    private Long viewCount = 0L;

    @Column(columnDefinition = "bigint comment'点击数'")
    private Long clickCount = 0L;

    @Column(columnDefinition = "bigint comment'下单数'")
    private Long orderCount = 0L;

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSaleCount() {
        return saleCount;
    }

    public void setSaleCount(Long saleCount) {
        this.saleCount = saleCount;
    }

    public Long getShareCount() {
        return shareCount;
    }

    public void setShareCount(Long shareCount) {
        this.shareCount = shareCount;
    }

    public Long getVerifyCount() {
        return verifyCount;
    }

    public void setVerifyCount(Long verifyCount) {
        this.verifyCount = verifyCount;
    }

    public Long getViewCount() {
        return viewCount;
    }

    public void setViewCount(Long viewCount) {
        this.viewCount = viewCount;
    }

    public Long getClickCount() {
        return clickCount;
    }

    public void setClickCount(Long clickCount) {
        this.clickCount = clickCount;
    }

    public Long getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Long orderCount) {
        this.orderCount = orderCount;
    }

    public Long getMarketProductId() {
        return marketProductId;
    }

    public void setMarketProductId(Long marketProductId) {
        this.marketProductId = marketProductId;
    }


    @Override
    public String toString() {
        return "ProductStatistics{" +
                "mallId=" + mallId +
                ", merchantId=" + merchantId +
                ", id=" + id +
                ", productId=" + productId +
                ", dateCreated=" + dateCreated +
                ", marketProductId=" + marketProductId +
                ", saleCount=" + saleCount +
                ", lastUpdated=" + lastUpdated +
                ", shareCount=" + shareCount +
                ", isDelete=" + isDelete +
                ", verifyCount=" + verifyCount +
                ", version=" + version +
                ", viewCount=" + viewCount +
                ", clickCount=" + clickCount +
                ", orderCount=" + orderCount +
                '}';
    }
}
